#!/usr/bin/perl -w

open(FD,"/dev/ttyS0");

$corr=$ARGV[0];
$corr=$corr+0;

while (<FD>) {

    chomp;
    $th=$_+0;
    $dt=`/bin/date "+%s"`;
    $dt=$dt+0;
    
    print $dt," -> ",$th," ->",(($dt-$corr)-$th),"\n";
}
